Skip to content

feat: add cortex count command#8

Open
rishicodely wants to merge 3 commits intoProductionLineHQ:mainfrom
rishicodely:main
Open

feat: add cortex count command#8
rishicodely wants to merge 3 commits intoProductionLineHQ:mainfrom
rishicodely:main

Conversation

@rishicodely
Copy link

What does this PR do?

Adds a new cortex count CLI command to display total memory count using the /api/health endpoint.
Supports optional --json output.

Why?

The current cortex status command shows memory count along with other details.
This PR introduces a lightweight command to quickly retrieve just the memory count, improving usability for scripting and quick checks.

How to test it

  1. Start the Cortex daemon:
    node dist/start.js
  2. Run:
    node dist/index.js count
    → Should print a number (e.g., 0, 47)
  3. Run:
    node dist/index.js count --json
    → Should output:
    { "total": }

Screenshots / recordings

Screenshot 2026-03-23 173301

Checklist

  • [y] Tests pass (pnpm test)
  • [y] Types pass (pnpm typecheck)
  • [y] Lint passes (pnpm lint)
  • [y] CHANGELOG.md updated (if user-facing change)
  • [y] Docs updated (if behavior changed)
  • [y] Commit messages follow Conventional Commits

Copy link

@github-actions github-actions bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Welcome to Cortex! Thanks for your first pull request.

Here's what happens next:

  1. CI will run tests, linting, and type checks automatically
  2. A maintainer will review your changes
  3. We may suggest some modifications or improvements
  4. Once approved, we'll merge it in

Checklist reminder:

  • Tests pass (pnpm test)
  • Lint passes (pnpm lint)
  • Types check (pnpm typecheck)

Thanks for helping make Cortex better! Every contribution matters.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants